Skip to content

perf: cache doctor beads dir resolution#2643

Closed
osamu2001 wants to merge 2 commits intosteveyegge:mainfrom
osamu2001:fix/bare-repo-fallback-follow-up
Closed

perf: cache doctor beads dir resolution#2643
osamu2001 wants to merge 2 commits intosteveyegge:mainfrom
osamu2001:fix/bare-repo-fallback-follow-up

Conversation

@osamu2001
Copy link
Contributor

Summary

Testing

  • go test ./cmd/bd/doctor -run 'Test(ResolveBeadsDirForRepo_BareParentWorktreeFallback|ResolveBeadsDirForRepo_CachesFallbackResult|CheckMetadataVersionTracking_BareParentWorktreeFallback|CheckLockHealth_BareParentWorktreeFallback|CheckDoltLocks_BareParentWorktreeFallback)$'
  • go run ./cmd/bd doctor with a git wrapper confirmed fallback rev-parse calls dropped from 28 to 1

Context

This is a follow-up to the review on #2617 after that branch had effectively already landed in main.

@codecov-commenter
Copy link

codecov-commenter commented Mar 16, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
4806 1 4805 548
View the top 1 failed test(s) by shortest run time
github.com/steveyegge/beads/cmd/bd::TestGetVersionsSinceOrder
Stack Traces | 0s run time
=== RUN   TestGetVersionsSinceOrder
    version_tracking_test.go:80: Versions not in chronological order: 0.61.0 (2026-03-15) should come before 0.57.0 (2026-03-01)
--- FAIL: TestGetVersionsSinceOrder (0.00s)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

steveyegge added a commit that referenced this pull request Mar 17, 2026
Cache ResolveBeadsDirForRepo results so the git worktree fallback
lookup runs once per doctor invocation instead of 28 times.

Co-Authored-By: osamu2001 <osamu2001@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@steveyegge
Copy link
Owner

Fix-merged to main in 389f979. Thank you @osamu2001!

@steveyegge steveyegge closed this Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants